package springBoot_dzfpxt.entity;


import java.sql.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

@Entity
public class QuanxianTable {
	private Integer id;
	private Boos boos;	//租户的id		外键
	private String quanxian;	//权限	0为有效，1为无效（超管新增租户以后默认为0，一年失效，失效后改为1，失效后需要重新授权才能激活）
	private Date startDate;	//权限起始日期
	private Date overDate;	//权限结束日期
	private Double startmoney;	//激活权限缴纳的费用
	
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@ManyToOne(cascade=CascadeType.ALL)//cascade 是给所有权限  以至于通过改变他同时改变他的下级时不会造成没有瞬态实例化的错误
	public Boos getBoos() {
		return boos;
	}
	public void setBoos(Boos boos_id) {
		this.boos = boos_id;
	}
	public String getQuanxian() {
		return quanxian;
	}
	public void setQuanxian(String quanxian) {
		this.quanxian = quanxian;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Date getOverDate() {
		return overDate;
	}
	public void setOverDate(Date overDate) {
		this.overDate = overDate;
	}
	public Double getStartmoney() {
		return startmoney;
		
	}
	public void setStartmoney(Double startmoney) {
		this.startmoney = startmoney;
	}
	public QuanxianTable() {
		super();
		// TODO Auto-generated constructor stub
	}
	
}
